How to properly type a function that is mapped back through several other objects

welcome to shbcf.ru